<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<!-- $Id: overview.html,v 1.3 2005/08/12 02:56:54 dsyrstad Exp $
  -- Copyright (c) 2003, David A. Hall
  -->
</HEAD>
<body>
  <p>
    jga is a functors library: the intent is to explore and exploit
    functors as a design and implementation tool to reduce boilerplate
    coding.  A functor is an object that encapsulates a function or
    expression: it can take arguments and produce results, as can any
    method, expression, or function (in other languages that support
    functions).  Unlike an expression, as an object it can be passed as an
    argument without being executed; it can be persisted to a database or
    file; it can be serialized and passed from client to server (and
    back); and it can be instantiated at runtime based on information
    unavailable at compile-time.
  </p><p>
    How many times have you...
  <ul>
    <li>...found a method that does almost exactly what you want, except for
    one or two lines?</li><br/>
    <li>...created a new class in order to override one simple method, because
    it is almost what you need?</li><br/>
    <li>... written a boilerplate implementation of an interface that knows
    about your specific business objects or your specific application?</li><br/>
    <li>... copied an entire class to change the one line or method rather
    than refactoring it?</li><br/>
  </ul>
  </p><p>
    Functors provide a mechanism that can reduce all of the design
    problems: they allow you to (in effect) pass a line of code as an
    argument to a constructor or method, giving you a way to parameterize
    objects on simple behavour.
  </p><p>
    jga borrows the functors from C++ STL library, and extends them with
    functors that are natural for java programmers.  jga also borrows the
    notion that basic functors implementing common operations can be
    profitably combined into compound structures to implement more useful
    logic.
  </p><p>
    Compound functors of the type that jga promotes fall naturally into a
    tree structure.  Taking advantage of this yields a use of functors
    that may be relatively new to many: as a form of executable metadata
    that can be interpreted for the information embodied in the structure.
    To facilitate this, all jga functors provide support for a Visitor
    implementation.  
  </p><p>
    The most natural application of a functor library is in the
    implementation of common algorithms, such as those defined in STL.
    jga provides a set of such algorithms that have been adapted to java
    conventions and idioms, as opposed to being a direct port of STL.
  </p><p>
    An area that is rife with one line interfaces is event driven programming
    of the sort that is typified by Swing.  jga includes the beginnings of a
    set of tools for use in GUI coding that addresses the common problems
    described above: the continual reinvention of the same set of small
    wheels in the set of listeners, editors, renderers, and models that 
    accompany a typical Swing program.
  </p>

<!--
jga builds on the new generic capability in Java 1.5, providing standard 
algorithms that are not currently provided in the standard library, 
functors and predicates, and implementations of common java classes 
that are adapted for use with generics.
<P>
The goal of this project is to provide functionality roughly analogous
to the portions of the C++ STL library that are not already provided by
the Java. The primary functionality to be provided is:
<UL>
  <LI>
    <P>
      a set of functors and predicates that may be applied both the the
      generic collections and to other areas of the standard java library.
    </P> 
  </LI>
  <LI>
    <P> 
       basic utility algorithms for use with java collections such as 
       those found in STL
    </P>
  </LI>
  <LI>
    <P>
       implementations of standard java classes that are intended to be
       user-derivable that apply the algorithms and functors for general
       benefit (for example, implementations of standard swing models
       that take advantage of functors)
    </P>
  </LI>
</UL>

<P>
   We will not necessarily reproduce STL in all of its details: where Java
   and C++ provide different interpretations of standard design patterns,
   we will stay true to standard Java practices in order to be as
   comfortable for Java programmers to adopt as is practical. We will also
   not necessarily be limited by the scope or approach of STL
</P> 
-->
<H2>System Requirements</H2> 
<P>
   jga supports both Java 1.4 and 1.5 with two different versions of the
   main jga jarfile.  The 1.4 compatability jar has a -retro suffix. 
   The capabilities of the package are essentially the same: to work with
   1.4, simply omit the generic parameters.
 </P> 
</body>
</HTML>
